class cDate_t
{
public:
	//*************************************************************************
	//default CTOR from current time
	//*************************************************************************
	cDate_t();

	//*************************************************************************
	//copy CTOR
	//*************************************************************************
	cDate_t(const cDate_t& d);

	//*************************************************************************
	//CTOR from (year >= 1900)
	//*************************************************************************
	cDate_t(const int ye);

	//*************************************************************************
	//CTOR from year (>= 1900) and month (1-12)
	//*************************************************************************
	cDate_t(const int ye, const int mo);

	//*************************************************************************
	//CTOR from year (>= 1900), month (1-12) and day (1-31)
	//  "Thirty days hath September,
	//   April, June, and November:
	//   All the rest have thirty-one,
	//   Except for February,
	//   Which hath twenty-eight days clear,
	//   And twenty-nine in each leap year." 
	//*************************************************************************
	cDate_t(const int ye, const int mo, const int da);

	//*************************************************************************
	//DTOR
	//*************************************************************************
	~cDate_t();


	//*************************************************************************
	//assignment operator
	//*************************************************************************
	const cDate_t& operator=(const cDate_t& d);

	//*************************************************************************
	//set year (greater then 1899) in existing object
	//return 1 if succeeded, 0 otherwise
	//*************************************************************************
	int setYear(const int ye);

	//*************************************************************************
	//set month (1-12) in existing object
	//return 1 if succeeded, 0 otherwise
	//*************************************************************************
	int setMonth(const int mo);

	//*************************************************************************
	//set day (1-MAX) in existing object
	//return 1 if succeeded, 0 otherwise
	//*************************************************************************
	int setDay(const int da);

	//*************************************************************************
	//print out date object in three formats
	//format=1: dd/mmm/yyyy     example: 01/Apr/2010
	//format=2: dd/mm/yyyy      example: 01/04/2010      Europian
	//format=3: mm/dd/yyyy		example: 04/01/2010      American
	//*************************************************************************
	void printOut(const int frmt) const;

	//*************************************************************************
	//get year (>1899)
	//*************************************************************************
	int getYear() const;

	//*************************************************************************
	//get month (1-12)
	//*************************************************************************
	int getMonth() const;

	//*************************************************************************
	//get day (1-31)
	//*************************************************************************
	int getDay() const;

	//*************************************************************************
	//get day of year (1-365)
	//*************************************************************************
	int getDayOfYear() const;

	//*************************************************************************
	//is  year leap?
	//*************************************************************************
	bool isYearLeap() const;

	//*************************************************************************
	//return name of day (Sun,Mon,... )
	//*************************************************************************
	const char* getWeekdayName() const;

	//*************************************************************************
	//return name of month (Jan,Feb,... )
	//*************************************************************************
	const char* getMonthName() const;




private:
	//number of days in each month in leap and not leap years
	static const int numOfDaysInEachMonth[2][12];
	//month names 
    static const char* monthName[12];
	//weekday names
	static const char * weekday[7];

	int year;    //(>=1900)
	int month;   //(1-12)
	int day;     //(1-31)
	bool leap;
};
